package Test::YAVMM::Console;
use warnings;
use strict;

use Test::Most;
use base 'My::Test::Class';

sub address : Tests(3) {
    my $test    = shift;

  SKIP: {
	skip 'base class', 3 if ($test->class eq 'YAVMM::Console');

	my $console = $test->class->new;

	can_ok $console, 'address';
	ok !defined $console->address,
	    '... and address should start undefined';
	$console->address('127.0.0.1');
	is $console->address, '127.0.0.1',
	    '... and setting its value should succeed';
    }
}

sub port : Tests(3) {
    my $test    = shift;

  SKIP: {
	skip 'base class', 3 if ($test->class eq 'YAVMM::Console');

	my $console = $test->class->new;

	can_ok $console, 'port';
	ok !defined $console->address,
	    '... and port should start undefined';
	$console->port('127');
	is $console->port, '127',
	    '... and setting its value should succeed';
    }
}

sub _init_test_obj {
    my $test  = shift;
    my $class = $test->class;

    my $obj = $class->new(
	'address' => '127.0.0.2',
	'port'    => '1776',
    );

    return $obj;
}

1;
